import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import homePage from '@/views/layout/pageLayout.vue'

const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        component: homePage,
        children: [
          {
            // 当 /user/:id/profile 匹配成功
            // UserProfile 将被渲染到 User 的 <router-view> 内部
            path: 'homePage',
            component: homePage,
          },
        ],
      },
  /* {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import('../views/AboutView.vue')
  } */
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
